home *** CD-ROM | disk | FTP | other *** search
/ Aminet 35 / Aminet 35 (2000)(Schatztruhe)[!][Feb 2000].iso / Aminet / game / shoot / ADescentSrc.lha / descent / includes / coindev.h < prev    next >
C/C++ Source or Header  |  1998-03-03  |  4KB  |  125 lines

  1. /*
  2. THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
  3. SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
  4. END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
  5. ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
  6. IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
  7. SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
  8. FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
  9. CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
  10. AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.  
  11. COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
  12. */
  13. /*
  14.  * $Source: /usr/CVS/descent/includes/coindev.h,v $
  15.  * $Revision: 1.1.1.1 $
  16.  * $Author: nobody $
  17.  * $Date: 1998/03/03 15:11:53 $
  18.  * 
  19.  * Routines to read the coin counter.
  20.  * 
  21.  * $Log: coindev.h,v $
  22.  * Revision 1.1.1.1  1998/03/03 15:11:53  nobody
  23.  * reimport after crash from backup
  24.  *
  25.  * Revision 1.1.1.1  1998/02/13  20:20:18  hfrieden
  26.  * Initial Import
  27.  *
  28.  * Revision 2.0  1995/02/27  11:30:38  john
  29.  * New version 2.0, which has no anonymous unions, builds with
  30.  * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
  31.  * 
  32.  * Revision 1.2  1994/09/16  16:15:10  john
  33.  * Added acrade sequencing.
  34.  * 
  35.  * Revision 1.1  1994/09/16  12:56:24  john
  36.  * Initial revision
  37.  * 
  38.  * 
  39.  */
  40.  
  41.  
  42.  
  43. #ifndef _COINDEV_H
  44. #define _COINDEV_H
  45.  
  46. /* Header file to define the JoyStick access functions */
  47. /* and bit-masks.                                      */
  48. /*                                                     */
  49. /* Updates:                                            */
  50. /*                                                     */
  51. /*    + Reworked the conio.h check to work with both   */
  52. /*      Borland and Watcom compilers.                  */
  53. /*    + Added UPDATE_JOYSTICK_VALUE and global value   */
  54. /*      JoyStickValue to allow for a stable state of   */
  55. /*      joystick condition.  This means that once at   */
  56. /*      the begining of each game loop (frame) you     */
  57. /*      should execute UPDATE_JOYSTICK_VALUE, then     */
  58. /*      use JoyStickValue for the remainder of that    */
  59. /*      entire loop to determine joystick settings.    */
  60. /*    + Added values needed by the CoinMech section    */
  61. /*      of the digital I/O card.                       */
  62.  
  63. #define IOCARD_BASEPORT         0x2A0
  64.  
  65. //#define JOYSTICK_PORT           (IOCARD_BASEPORT + 1)
  66. //#define JS_TRIGGER              0x0001
  67. //#define JS_BUTTONLEFT           0x0002
  68. //#define JS_BUTTONRIGHT          0x0004
  69. //#define JS_BUTTONCENTER         0x0008
  70. //#define JS_UP                   0x0010
  71. //#define JS_DOWN                 0x0020
  72. //#define JS_LEFT                 0x0040
  73. //#define JS_RIGHT                0x0080
  74.  
  75. #define COINMECH_CMDPORT        (IOCARD_BASEPORT + 7)
  76. #define COINMECH_ADJPORT        (IOCARD_BASEPORT + 3)
  77.  
  78. #define COINMECH1_PORT          (IOCARD_BASEPORT + 4)
  79. #define COINMECH2_PORT          (IOCARD_BASEPORT + 5)
  80. #define COINMECH3_PORT          (IOCARD_BASEPORT + 6)
  81.  
  82. #define COINMECH1_ADJMASK       0x10
  83. #define COINMECH2_ADJMASK       0x20
  84. #define COINMECH3_ADJMASK       0x40
  85.  
  86. #define COINMECH1_CTRLMASK      0x30
  87. #define COINMECH2_CTRLMASK      0x70
  88. #define COINMECH3_CTRLMASK      0xB0
  89.  
  90.  
  91. // Include file for use with gameport coin mech interface and parallel
  92. // port joystick interface
  93.  
  94. //#define GAMEPORT_ADDR 0x201
  95.  
  96. //#define PARALLEL_ADDR 0x378
  97.  
  98. #define MECH1   16
  99. #define MECH2   32
  100. #define MECH3   64
  101. // #define MECH4          // Not supported yet.
  102.  
  103. //#define FIRE    1
  104. //#define LBUTTON 2
  105. //#define RBUTTON 4
  106. //#define CBUTTON 8
  107.  
  108. //#define UP      16
  109. //#define DOWN    32
  110. //#define LEFT    64
  111. //#define RIGHT   128
  112.  
  113. //#define JOY_GAMEPORT  0
  114. //#define JOY_PARALLEL  1
  115. //#define JOY_IODEV     2
  116.  
  117. int coindev_init(int CoinMechNumber);
  118. unsigned int coindev_read(int CoinMechNumber);
  119. unsigned int coindev_count(int CoinMechNumber);
  120.  
  121. #define ARCADE_FIRST_SECONDS         120
  122. #define ARCADE_CONTINUE_SECONDS    60
  123.  
  124. #endif
  125.